package com.itemp.wifidirectsend;


import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.LocationManager;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.view.View;

import java.util.ArrayList;

/**
 *WiFi Direct
 *WiFi直连，服务端创建群组，等待客户端连接发送文件
 * 2025-4-16 Jackly
 */

public class MainActivity extends BaseActivity{

    private static final String TAG = "WiFiDirect";
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn_wifi_send).setOnClickListener(view -> {
            startActivity(FileSenderActivity.class);
        });
        findViewById(R.id.btn_wifi_receiver).setOnClickListener(view -> {
            startActivity(FileReceiverActivity.class);
        });
    }

    @Override
    protected void onStart() {
        super.onStart();
//        LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
//        boolean isGpsEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
//        Log.d(TAG,"isGpsEnabled  " + isGpsEnabled);
    }
}